package com.by.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class StockController {

    @GetMapping("/stock")
    public Map query(int id) {
        System.out.println("id===="+id);
        Map map = new HashMap();
        map.put("goodsId", id);
        map.put("stock", 10);
        return map;
    }
}
